home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
hstelix2.zip
/
UP-H.SLT
< prev
Wrap
Text File
|
1991-11-17
|
2KB
|
50 lines
// Script written by Reuben Sumner on 11-16-91
// Purpose:
// To allow for uploading of files using the HS/Link protocol
// without having problems with file name expansion for uploads
main ()
{
int mpos; // position into _ext_filespec
str _file_name[64]; // file name to be worked upon
str _cmd_line[128]; // command line to pass to HS/Link
int itemp; // temporary integer
str stemp[64]; // temporary string;
int stop;
stop = 0;
_cmd_line = "-E";
itos (get_baud(),stemp);
strcat (_cmd_line,stemp);
strcat (_cmd_line," -P");
itos (get_port(),stemp);
strcat (_cmd_line,stemp);
strcat (_cmd_line," -U");
strcat (_cmd_line,_down_dir);
strcat (_cmd_line," ");
if (strlen(_ext_filespec) == 0) // download selected not upload
stop = 1;
while (!stop) {
itemp = strchr (_ext_filespec,mpos,' '); // search for first space
if (itemp != -1) { // more than one file to go?
substr (_ext_filespec,mpos,itemp-mpos,_file_name);
// extact the filename
mpos = itemp + 1; // next time search starting at after the
// space character
} else {
substr (_ext_filespec,mpos,strlen(_ext_filespec)-mpos+1,_file_name);
// get last file name into _file_name
stop = 1; // last file name extracted
}
fnstrip (_file_name,12,stemp); // drive and path only
if (strlen(stemp) == 0) // no drive or path
strcat (_cmd_line,_up_dir); // add upload directory
strcat (_cmd_line,_file_name); // add file name
strcat (_cmd_line," "); // add space
}
run ("HSLINK",_cmd_line,0); // finally run the sucker
}